//
//  OneViewController.m
//  WeiDuYY
//
//  Created by eluosi on 2019/1/25.
//  Copyright © 2019 W ke杨. All rights reserved.
//

#import "OneViewController.h"
#import <SDAutoLayout.h>
#import "FilmViewController.h"


@interface OneViewController (){
    UIImageView *oneimage;
}

@end

@implementation OneViewController
-(void)viewWillAppear:(BOOL)animated{
    
    self.tabBarController.tabBar.hidden = YES;
}
-(void)viewWillDisappear:(BOOL)animated{
    self.tabBarController.tabBar.hidden = NO;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self setBacoler];
    [self setNav];
}
-(void)setNav{
    //按钮
    UIButton *btn1 = [[UIButton alloc] init];
    [btn1 setImage:[UIImage imageNamed:@"com_icon_my_default_hdpi"] forState:UIControlStateNormal];
    [btn1 addTarget:self action:@selector(buttonone) forControlEvents:UIControlEventTouchUpInside];
    //添加
    
    [self.view addSubview:btn1];
    btn1.sd_layout.topSpaceToView(self.view, 570).leftSpaceToView(self.view,0).widthIs(60).heightIs(60);
}
-(void)setBacoler{
    
    oneimage = [[UIImageView alloc] init];
    [self.view addSubview:oneimage];
    oneimage.image = [UIImage imageNamed:@"hdpi副本 2"];
    oneimage.sd_layout.topSpaceToView(self.view, 50).leftSpaceToView(self.view, 60).widthIs(300).heightIs(150);

    UIImageView *twoimage = [[UIImageView alloc] init];
    [self.view addSubview:twoimage];
     twoimage.image = [UIImage imageNamed:@"hdpi副本 2"];

    twoimage.sd_layout.topSpaceToView(self.view, 230).leftSpaceToView(self.view, 60).widthIs(300).heightIs(150);

    UIImageView *threeimage = [[UIImageView alloc] init];
     threeimage.image = [UIImage imageNamed:@"hdpi副本 2"];
    [self.view addSubview:threeimage];
    threeimage.sd_layout.topSpaceToView(self.view, 410).leftSpaceToView(self.view, 60).widthIs(300).heightIs(150);
}
//-(void)setNav{
//
//
//}
-(void)buttonone{
    NSLog(@"134");
    FilmViewController  * F = [[FilmViewController alloc]init];
    [self.navigationController popViewControllerAnimated:YES];
}
@end
